Extract blue lines from PZ cube

Mainly Hβ, He II, He I, [O III], [Ar IV], [N I], Si II

Library imports and data loading

Copied from the 02-01-Raman-Wings-IR-Source-C notebook:

We only have the coadded version of the Peter cube, so the seeing is a bit worse than in the sharp ESO cube

Use moments to extract the Hβ line and other blue lines

Use a generic name for the cube over the broad wavelength range to reduce need for edits when we repurpose this later.

Only one cube available (unlike with the pipeline ESO version), so I am removing all reference to mcube

These are the ranges that the continum is fitted to. It is OK if they contain some weak lines.

There does seem a lot more structure in the "continuum" bands, as compared with the ESO cubes. Hopefully, this will not be too much of an issue.

So it turns out that a high order polynomial is needed because of the broad wavelength range. And it is better to use the full set of points rather than the median and that is faster too!

Calculating the median must be expensive.

Inspect the blue spectrum

Compare bow shock to median of cube

These are a lot harder to see than in the ESO cube, unfortunately. In following cells I will experiment with subtracting a median (or other percentile) spectrum. In the meantime, these are the original line IDs.

Left to right:

Subtracting the median gives much better results (blue line).

I had experimented with using a lower quartile than the median for subtracting, but that was worse. I also tries doing the median over only the non-bowshock parts ogf the map, but that makes hardly any difference (black line).

The long wavelength side of the strong [O III] lines is less interesting:

He I line at 5047.74 and [Ar III] line at 5193.69

Extract He II line

So we can still see the bow shock, but the image is not as clear as with the ESO cube. The horizontal banding artifacts are worse.

Unfortunately, the velocity spread does not decrease with binning, although the sigma spread does.

This velocity map has serious problems with the horizontal banding.

In this case, the image is as good or better than the ESO one. Note that the minimum value is 100 since there seems to be diffuse emission over the entire map. In the ESO case, this was eliminated by definition.

These moment plots look pretty good. The velocity is well-contrained to 170 km/s in the brightest parts. It looks to be slightly redder in the fainter parts (175 to 180 km/s).

This is the velocity map, which confirms that the BS seems slightly blue-shifted compared with the more diffuse [Ar IV] emission.

And the other [Ar IV] line. This is contaminated by He I, which we will have to sort out at some point.

So despite the contamination, the ratio is roughly constant at around 1.5 in the bright parts.

Make a median-subtracted cube

So far, we have been looking at median-subtracted spectra, but have not applied the same technique to the whole cube. So I am going to try that, to see if it improves the moment maps.

So the answer is that it makes pretty much zero difference, apart from shifting the intensity baseline in some cases.

Verdict: Not worth pursuing for these lines, but see below where we find it makes a big improvement for [Ar III].

Extract super-weak [Ar III] line

When I used the normal cube, there is nothing there at all. BUT, with the median-subtracted cube I get something very similar to what I got from the ESO pipeline cube.

This has the classic distribution seen in medium ionization lines, where the brightest part is in the lower left.

We do have bad artefacts in vertical strips on the left and right edges though.

Extract He I 4922

This one is good enough signal to see the increase in brightness at the bow shock.

Extract He I 5048 line

Extract Hβ line

Overview before correcting the sky:

Make a 30 Å window:

That is looking great now. The first moment is very similat to Hα, which is encouraging.

This is extremely similar to the results for Ha, which is encouraging. We see the same 3 clumps on the I-V plane, and with very similar velocities.

The sigma is a bit larger than Ha, but that is to be expected since the instrumental broadening is larger.